﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace LockCrypt.Core {
    [Flags]
    public enum FieldMetaData {
        None = 0,
        Password = 1,
        Url = 2,
        Phone = 4
    }

    public enum EncryptionProviders {
        None,
        Aes256
    }

    public static class Constants {
        /// <summary>
        /// Gets the application version.
        /// </summary>
        /// <returns>The application version.</returns>
        public static Version GetVersion() {
            return System.Reflection.Assembly.GetCallingAssembly().GetName().Version;
        }

        /// <summary>
        /// Gets the date the assembly was compiled.
        /// </summary>
        public static DateTime BuildDate = Utils.RetrieveLinkerTimestamp();

        /// <summary>
        /// Types available for Import/Export
        /// </summary>
        [Flags]
        public enum DataType {
            Auto,
            XML,
            SQLite,
            Legacy,
        }

        /// <summary>
        /// Types of database provider available
        /// </summary>
        [Flags]
        public enum DatabaseType {
            XML,
            SQLite,
            Legacy,
            MySQL
        }

        /// <summary>
        /// Available application languages.
        /// </summary>
        /*public static Dictionary<string, CultureInfo> Languages = new Dictionary<string, CultureInfo>() {// new Comparers.CultureInfoEnglishNameComparer(), StringComparer.InvariantCultureIgnoreCase) {
            {"ar-MA", CultureInfo.GetCultureInfo("ar-MA")},
            {"bg-BG", CultureInfo.GetCultureInfo("bg-BG")},
            {"cs-CZ", CultureInfo.GetCultureInfo("cs-CZ")},
            {"da-DK", CultureInfo.GetCultureInfo("da-DK")},
            {"de-DE", CultureInfo.GetCultureInfo("de-DE")},
            {"en-GB", CultureInfo.GetCultureInfo("en-GB")},
            //{"en-GB-IK", CultureInfo.GetCultureInfo("en-GB-IK")},
            {"es-ES", CultureInfo.GetCultureInfo("es-ES")},
            {"fr-FR", CultureInfo.GetCultureInfo("fr-FR")},
            {"hu-HU", CultureInfo.GetCultureInfo("hu-HU")},
            {"it-IT", CultureInfo.GetCultureInfo("it-IT")},
            {"ka-GE", CultureInfo.GetCultureInfo("ka-GE")},
            {"pl-PL", CultureInfo.GetCultureInfo("pl-PL")},
            {"ru-RU", CultureInfo.GetCultureInfo("ru-RU")},
            {"sl-SI", CultureInfo.GetCultureInfo("sl-SI")},
            {"zh-CN", CultureInfo.GetCultureInfo("zh-CN")},
            {"zh-TW", CultureInfo.GetCultureInfo("zh-TW")}*/
        public static Dictionary<string, string> Languages = new Dictionary<string, string> {
            {"ar-MA", "ar-MA"},
            {"bg-BG", "Български"},
            {"cs-CZ", "Česky"},
            {"da-DK", "da-DK"},
            {"de-DE", "Deutsch"},
            {"en-GB", "English"},
            {"es-ES", "Español"},
            {"fr-FR", "fr-FR"},
            {"hu-HU", "Magyar"},
            {"it-IT", "Italiano"},
            {"ka-GE", "ქართული"},
            {"pl-PL", "Polski"},
            {"ru-RU", "Русский"},
            {"sl-SI", "Slovensko"},
            {"zh-CN", "简体中文"},
            {"zh-TW", "繁體中文"}
        };
            //langs.Add(new KeyValuePair<string, string>("he-IL", "עברית"));
            //langs.Add(new KeyValuePair<string, string>("pt-PT", "Português"));

        public const string DefaultIcon = "default";
        public const string DefaultGroupIcon = "folder_closed";
    }
}
